
columns <- c("ID", "CE1", "CE2", "CE3", "CE4", "CE5", 
              "CE9","ICA")
data <- read.csv("DATA_pooled.csv", header = FALSE, skip = 1,
                   col.names = columns, stringsAsFactors = FALSE)

data[1:10,]


LAB <- subset(data, ICA == 0)
ICA <- subset(data, ICA == 1)

# test

#histinfo<-hist(LAB$CE1,breaks=c(0,1,3,5,7,9,11,13,15,17,19,20),main="R",xlab = expression('CE'[R]),xaxt="n",freq = TRUE)
#axis(1, at=c(0.5, 2, 4,6,8,10,12,14,16,18,19.5), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"))
#histinfo

histinfo<-hist(LAB$CE1,main="R-Students",xlab = expression('CE'[R]),breaks=c(-1,1,3,5,7,9,11,13,15,17,19,21),xaxt="n")
axis(1, at=c(0, 2, 4,6,8,10,12,14,16,18,20), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"),cex.axis=0.79)
histinfo

histinfo<-hist(ICA$CE1,main="R-Actuaries",xlab = expression('CE'[R]),breaks=c(-10,10,30,50,70,90,110,130,150,170,190,210),xaxt="n")
axis(1, at=c(0, 20, 40,60,80,100,120,140,160,180,200), labels=c("5", "20", "40","60","80","100","120","140","160","180","195"),cex.axis=0.75)
histinfo

#

#pdf("LAB_CE_R.pdf") 
hist(LAB$CE1,main="R-Students",xlab = expression('CE'[R]),breaks=c(-1,1,3,5,7,9,11,13,15,17,19,21),xaxt="n")
axis(1, at=c(0, 2, 4,6,8,10,12,14,16,18,20), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"),cex.axis=0.79)
#dev.off() 

#pdf("ICA_CE_R.pdf") 
hist(ICA$CE1,main="R-Actuaries",xlab = expression('CE'[R]),breaks=c(-10,10,30,50,70,90,110,130,150,170,190,210),xaxt="n")
axis(1, at=c(0, 20, 40,60,80,100,120,140,160,180,200), labels=c("5", "20", "40","60","80","100","120","140","160","180","195"),cex.axis=0.75)
#dev.off() 

#pdf("LAB_CE_CR0.pdf") 
hist(LAB$CE3,main="CR0-Students",xlab = expression('CE'[CR0]),breaks=c(-1,1,3,5,7,9,11,13,15,17,19,21),xaxt="n")
axis(1, at=c(0, 2, 4,6,8,10,12,14,16,18,20), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"),cex.axis=0.79)
#dev.off() 

#pdf("ICA_CE_CR0.pdf") 
hist(ICA$CE3,main="CR0-Actuaries",xlab = expression('CE'[CR0]),breaks=c(-10,10,30,50,70,90,110,130,150,170,190,210),xaxt="n")
axis(1, at=c(0, 20, 40,60,80,100,120,140,160,180,200), labels=c("5", "20", "40","60","80","100","120","140","160","180","195"),cex.axis=0.75)
#dev.off() 

#pdf("LAB_CE_CR25.pdf") 
hist(LAB$CE2,main="CR25-Students",xlab = expression('CE'[CR25]),breaks=c(-1,1,3,5,7,9,11,13,15,17,19,21),xaxt="n")
axis(1, at=c(0, 2, 4,6,8,10,12,14,16,18,20), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"),cex.axis=0.79)
#dev.off() 

#pdf("ICA_CE_CR25.pdf") 
hist(ICA$CE2,main="CR25-Actuaries",xlab = expression('CE'[CR25]),breaks=c(-10,10,30,50,70,90,110,130,150,170,190,210),xaxt="n")
axis(1, at=c(0, 20, 40,60,80,100,120,140,160,180,200), labels=c("5", "20", "40","60","80","100","120","140","160","180","195"),cex.axis=0.75)
#dev.off() 

#pdf("LAB_CE_MU0.pdf") 
hist(LAB$CE5,main="MU0-Students",xlab = expression('CE'[MU0]),breaks=c(-1,1,3,5,7,9,11,13,15,17,19,21),xaxt="n")
axis(1, at=c(0, 2, 4,6,8,10,12,14,16,18,20), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"),cex.axis=0.79)
#dev.off() 

#pdf("ICA_CE_MU0.pdf") 
hist(ICA$CE5,main="MU0-Actuaries",xlab = expression('CE'[MU0]),breaks=c(-10,10,30,50,70,90,110,130,150,170,190,210),xaxt="n")
axis(1, at=c(0, 20, 40,60,80,100,120,140,160,180,200), labels=c("5", "20", "40","60","80","100","120","140","160","180","195"),cex.axis=0.75)
#dev.off() 

#pdf("LAB_CE_MU25.pdf") 
hist(LAB$CE4,main="MU25-Students",xlab = expression('CE'[MU25]),breaks=c(-1,1,3,5,7,9,11,13,15,17,19,21),xaxt="n")
axis(1, at=c(0, 2, 4,6,8,10,12,14,16,18,20), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"),cex.axis=0.79)
#dev.off() 

#pdf("ICA_CE_MU25.pdf") 
hist(ICA$CE4,main="MU25-Actuaries",xlab = expression('CE'[MU25]),breaks=c(-10,10,30,50,70,90,110,130,150,170,190,210),xaxt="n")
axis(1, at=c(0, 20, 40,60,80,100,120,140,160,180,200), labels=c("5", "20", "40","60","80","100","120","140","160","180","195"),cex.axis=0.75)
#dev.off() 

#pdf("LAB_CE_E.pdf") 
hist(LAB$CE9,main="E-Students",xlab = expression('CE'[E]),breaks=c(-1,1,3,5,7,9,11,13,15,17,19,21),xaxt="n")
axis(1, at=c(0, 2, 4,6,8,10,12,14,16,18,20), labels=c("0.5", "2", "4","6","8","10","12","14","16","18","19.5"),cex.axis=0.79)
#dev.off() 

#pdf("ICA_CE_E.pdf") 
hist(ICA$CE9,main="E-Actuaries",xlab = expression('CE'[E]),breaks=c(-10,10,30,50,70,90,110,130,150,170,190,210),xaxt="n")
axis(1, at=c(0, 20, 40,60,80,100,120,140,160,180,200), labels=c("5", "20", "40","60","80","100","120","140","160","180","195"),cex.axis=0.75)
#dev.off() 
